<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColumnsToSingleDiscountTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('el_single_discount', function (Blueprint $table) {
            $table->text('description')->nullable();    //折扣说明
            $table->timestamp('starts_at')->nullable(); //开始时间 2016-07-18 12:14:22
            $table->timestamp('ends_at')->nullable();   //结束时间 2016-07-28 12:14:22
            $table->string('path')->nullable();  //上传文件路径
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('el_single_discount', function (Blueprint $table) {
            $table->dropColumn(['description','starts_at','ends_at','path']);
        });
    }
}
